<?php



class FoodDiaryEntryMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.FoodDiaryEntryMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('food_diary_entry');
		$tMap->setPhpName('FoodDiaryEntry');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addForeignKey('USER_ID', 'UserId', 'int', CreoleTypes::INTEGER, 'user', 'ID', false, null);

		$tMap->addForeignKey('FOOD_ID', 'FoodId', 'int', CreoleTypes::INTEGER, 'food', 'ID', false, null);

		$tMap->addColumn('QUANTITY', 'Quantity', 'double', CreoleTypes::DOUBLE, false, null);

		$tMap->addColumn('DATE', 'Date', 'int', CreoleTypes::DATE, true, null);

		$tMap->addColumn('CREATED_AT', 'CreatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('UPDATED_AT', 'UpdatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

	} 
} 